﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Topcoder
{
    namespace SRM543
    {
        class EllysTSP
        {
            public int getMax(string path)
            {
                int countC = path.Replace("V", "").Length;
                int countV = path.Length - countC;                

                if (countC == countV) return countC + countV;
                else return Math.Min(countC,countV)*2 + 1;
            }
        }
    }
}
